{% extends 'base.html' %}

{% block content %}
<div class="container mt-4">
    <h2 class="mb-4">任务 {{ task.task_id }} 的日志</h2>
    <a href="{% url 'task_list' %}" class="btn btn-secondary mb-3">返回任务列表</a>
    <div class="table-responsive">
        <table class="table table-striped table-hover">
            <thead class="table-dark">
                <tr>
                    <th>日期</th>
                    <th>时间</th>
                    <th>内容</th>
                    <th>下一步行动</th>
                </tr>
            </thead>
            <tbody>
                {% for log in task.logs.all %}
                <tr>
                    <td>{{ log.date }}</td>
                    <td>{{ log.time }}</td>
                    <td>{{ log.content }}</td>
                    <td>{{ log.next_action }}</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>
{% endblock %}